import service from "./request";
let link = (url: any, method = 'GET', data = {}, params = {}) => {
    return new Promise((resolve, reject) => {
        service.request({
            url,
            method,
            data,
            params,
        }).then((ok: any) => {
            resolve(ok)
        }).catch((err: any) => {
            reject(err)
        })
    })
}
export default link